import React, { Component } from 'react'
import WithRouter from '../util/withRouter'
import QcEventEmitter from "../util/qcevents"
// import {withRouter} from "react-router-dom"
// 想让头这个组件里有路由信息，我需要使用一个高阶组件，高阶组件叫withRouter
 class Tou extends Component {
  fn(){
     console.log(this.props,"222");
     window.withRouter.history.go(-1)
      // this.props.history.go(-1) //返回上一级
  }
  render() {
    //  console.log(this.props)
    return (
      <div>
          <span onClick={this.fn.bind(this)}>&lt;返回</span>
      </div>
    )
  }
}

export default WithRouter(Tou)